<legend class='hyc-legend'>
    <i class="fa fa-list"></i>&nbsp;
    <span>服务订单列表</span>
</legend>
<div class="panel panel-default">
    <div class="panel-heading">服务订单列表</div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-1 text-right top7">起运地</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadDepartCity()" ng-model="queryOrderinfo.departProvinceCode" bs-options="p.code as p.name for p in loadProvince" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadDepartCounty()" ng-model="queryOrderinfo.departCityCode" bs-options="cityDate.code as cityDate.name for cityDate in departCity" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-model="queryOrderinfo.departCountyCode" bs-options="countyDate.code as countyDate.name for countyDate in departCounty" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-1 text-right top7">目的地</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadReceiptCity()" ng-model="queryOrderinfo.receiptProvinceCode" bs-options="p.code as p.name for p in loadProvince" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadReceiptCounty()" ng-model="queryOrderinfo.receiptCityCode" bs-options="cityDate.code as cityDate.name for cityDate in receiptCity" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-model="queryOrderinfo.receiptCountyCode" bs-options="countyDate.code as countyDate.name for countyDate in receiptCounty" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-1 text-right top7">下单日期</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <input type="text" class="form-control hyc-color" ng-model="queryOrderinfo.beginCreateTime" placeholder="开始时间" bs-datepicker date-format="yyyy-MM-dd">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <input type="text" class="form-control hyc-color" ng-model="queryOrderinfo.endCreateTime" placeholder="结束时间" bs-datepicker date-format="yyyy-MM-dd">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-1 text-right top7">客户订单号</div>
            <div class="col-md-3">
                <div class="form-group">
                    <input type="text" class="form-control hyc-color" ng-model="queryOrderinfo.orderCode" placeholder="客户订单号">
                </div>
            </div>
            <div class="col-md-2">
                <div class="form-group text-right">
                    <div class="btn btn-default btn-sm btn-warning" ng-click="loadData('query')">查询</div>&nbsp;&nbsp;&nbsp;
                    <div class="btn btn-default btn-sm" ng-click="clearQuery()">重置</div>
                </div>
            </div>
        </div>
        <div class="hyc-overflow-y">
            <table class="table table-bordered table-hover" style="width: 1800px;">
                <tr>
                    <th class="text-center">选择</th>
                    <th class="text-center">已调度情况</th>
                    <th class="text-center">当前位置</th>
                    <th class="text-center">客户订单号</th>
                    <th class="text-center">车架号</th>
                    <th class="text-center">下单客户</th>
                    <th class="text-center">起运地</th>
                    <th class="text-center">目的地</th>
                    <th class="text-center">上门提车</th>
                    <th class="text-center">送车上门</th>
                    <th class="text-center">下单时间</th>
                    <th class="text-center">车型列表</th>
                    <th class="text-center">计划提车时间</th>
                    <th class="text-center">计划交车时间</th>
                </tr>
                <tr ng-repeat="order in orderInfo track by $index" ng-class='{true: "hyc-color-ffebeb", false: "hyc-color-fffee5"}[order.dispatchTimes == 0]'>
                    <td class="text-center">
                        <input type="checkbox" class="checkbox hyc-inner-block" ng-model="order.active" value="{{order.id}}" ng-change="checkRow(this)" ng-disabled="order.dispatchTimes >= 1"/>
                    </td>
                    <td class="text-center">
                        <a href="javascript:;" ng-click="showWaybillModel(order.id)">详情</a>
                    </td>
                    <td>
                        {{order.currentAddr}}
                    </td>
                    <td class="text-center">
                        <a href="javascript:;" ui-sref="order-detail({orderId:order.orderId})">{{order.orderCode}}</a>
                    </td>
                    <td class="text-center">
                        {{order.vin}}
                    </td>
                    <td>
                        {{order.userName}}
                    </td>
                    <td>
                        {{order.departCityName==''? order.departProvinceName: order.departCityName}}
                    </td>
                    <td>
                        {{order.receiptCityName==''? order.receiptProvinceName: order.receiptCityName}}
                    </td>
                    <td class="text-center" ng-show="order.isPick">
                        是
                    </td>
                    <td class="text-center" ng-hide="order.isPick">
                        否
                    </td>
                    <td class="text-center" ng-show="order.isDeliv">
                        是
                    </td>
                    <td class="text-center" ng-hide="order.isDeliv">
                        否
                    </td>
                    <td class="text-center">{{order.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td>
                        {{order.brandName}}-{{order.vehicleName}}
                    </td>
                    <td class="text-center">{{order.deliveryDate | date:'yyyy-MM-dd'}}</td>
                    <td class="text-center">{{order.arriveDate | date:'yyyy-MM-dd'}}</td>
                </tr>
                <tr ng-if="orderInfo.length <= 0">
                    <td colspan="14">
                        <div class="hyc-color text-center">
                            暂无服务订单
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div ng-include="pageIncludeUrl" ng-if="orderInfo.length > 0"></div>
    </div>
    <div class="panel-footer text-right padding5">
        <!--<div class="btn btn-warning btn-sm" ng-click="createWaybill(10)">派单</div>-->
        <div class="btn btn-sm btn-warning" ng-click="robOrder()">抢单</div>
        &nbsp;&nbsp;&nbsp;
        <div class="btn btn-sm btn-warning" ng-click="sendOrder()">派单</div>
    </div>
</div>